<script>
	import {getUrlParams} from '@/common/js/utils.js'
	// import VConsole from 'vconsole'
	export default {
		onLaunch: function() {
			// var vConsole = new VConsole();
			// 默认语言设置
			let language = uni.getStorageSync("language") || "en"
			uni.setStorageSync("language", language)
			uni.setLocale(language);
			this.$i18n.locale = language
			// // 保存URL中存在的code
			let urlCode = getUrlParams("code")
			if(urlCode){
				this.$store.commit("user/setUrlCode",urlCode)
			}
			// 获取配置信息
			this.$store.dispatch("user/geConfigData")
			//获取用户信息
			let token = uni.getStorageSync("token")
			if(token){
				this.$store.dispatch("user/getUserInfo")
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
	page{
		//background: #ccc;
		background: #161827;
	}
	
	@font-face {
	
	font-family: 'myfont';
	
	src: url('/static/MSMINCHO.TTF') ;
	
	}
	
	body, .page{
		font-family: 'myfont';
	}
</style>
